<?php


namespace app\index\validate;


use think\Validate;

class EditValidate extends Validate
{
    protected $rule = [
        'password' => 'require|min:8|max:20|confirm:password_repeat',
        'email' =>'require|email|confirm:email_repeat',
        'vol_true_name'=>'require',
        'vol_cert_number'=>'require|idCard',
        'tel'=>'require|mobile'
    ];

    protected $message = [
        'password.require' =>'密码必须填写',
        'password.min' =>'密码最小8位',
        'password.max' =>'密码必须小于20位',
        'password.confirm'=>'密码和确认密码不一致,请您检查',
        'email.require' => '邮箱必须填写',
        'email.email' => '邮箱格式不正确',
        'email.confirm' =>'邮箱与确认邮箱不一致',
        'vol_true_name.require' =>'真实姓名必须填写',
        'vol_cert_number.require' => '身份证号必须填写',
        'vol_cert_number.idCard' =>'身份证号码格式错误',
        'tel.require' =>'手机号必须填写',
        'tel.mobile' =>'手机号格式不正确',
    ];
}
